home *** CD-ROM | disk | FTP | other *** search
/ Collection of Tools & Utilities / Collection of Tools and Utilities.iso / tex / devnag.zip / DEFS.MF < prev    next >
Text File  |  1991-05-09  |  3KB  |  100 lines

  1. %    DEFS.MF
  2. %    Header file with Metafont-parameters for the Devanagari fonts
  3. %    Copyright (C) 1991  University of Groningen, The Netherlands
  4. %
  5. %    Author:   Frans J. Velthuis
  6. %    Internet: velthuis@rc.rug.nl
  7. %    Bitnet:   velthuis@hgrrug5
  8. %
  9. %    This program is free software; you can redistribute it and/or modify
  10. %    it under the terms of the GNU General Public License as published by
  11. %    the Free Software Foundation; either version 1, or (at your option)
  12. %    any later version.
  13. %
  14. %    This program is distributed in the hope that it will be useful,
  15. %    but WITHOUT ANY WARRANTY; without even the implied warranty of
  16. %    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  17. %    GNU General Public License for more details.
  18. %
  19. %    You should have received a copy of the GNU General Public License
  20. %    along with this program; if not, write to the Free Software
  21. %    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  22.   penwd# :=thick# * cosd(rot-90);
  23.   usthick# := thick#;
  24.   mb# := .2ht#;
  25.   define_pixels(penwd,usthick,mb);
  26.   define_blacker_pixels(thin,thick,subthick);
  27.   thin := max(thin,1); subthick := max(subthick,1);
  28.   smoothing := 0;
  29.   pickup pencircle xscaled thick yscaled thin rotated rot;
  30.   scpenwd := pen_rt - pen_lft;
  31.   frame_pen := savepen;
  32.   pickup pencircle xscaled subthick yscaled thin rotated rot;
  33.   sub_pen := savepen;
  34.   picture v[];
  35.   numeric vbar[];
  36.   extra_endchar := extra_endchar & "chardp := chardp + mb#;" ;
  37.  
  38.   def tframe =
  39.   pickup frame_pen;
  40.   z1=(w-brm-.7rm,h); z2=(w,h);
  41.   x3=good.x w-brm; y3=h; z4=(x3,0);
  42.   draw z1--z2;
  43.   draw z3--z4;
  44.   enddef;
  45.  
  46.   def aframe =
  47.   pickup frame_pen;
  48.   z1=(w-rm-brm,h); z2=(w,h);
  49.   x3=good.x w-brm; y3=h; z4=(x3,0);
  50.   draw z1--z2;
  51.   draw z3--z4;
  52.   enddef;
  53.  
  54.   def endsav =
  55.   vbar[charcode]=x3;
  56.   cullit;
  57.   v[charcode]=currentpicture;
  58.   endchar;
  59.   enddef;
  60.  
  61.   def cutoff(expr t) =
  62.   x23 = vbar[t];
  63.   fill (-penwd,-d-mb-penwd)--(x23-.6scpenwd,-d-mb-penwd)--(x23-.6scpenwd,
  64.   h+penwd)--(-penwd,h+penwd)--cycle withweight 2;
  65.   cull currentpicture keeping(2,2);
  66.   addto currentpicture also v[t];
  67.   cull currentpicture keeping (2,2);
  68.   w := floor(x23-.6scpenwd);
  69.   enddef;
  70.  
  71.   def addpic(expr t) =
  72.   addto currentpicture also v[t];
  73.   enddef;
  74.  
  75.   def frame =
  76.   pickup frame_pen;
  77.   z1 = (0,ht); z2 = (w,ht);
  78.   x3 = good.x w-brm; y3 = ht; z4 = (x3,0);
  79.   draw z1--z2; draw z3--z4;
  80.   enddef;
  81.  
  82.   def sqdot(expr p)=
  83.   x25:=floor(xpart p)+.5;
  84.   y25:=floor(ypart p)+.5;
  85.   dwd:=ceiling(thick);
  86.   if not odd dwd: dwd:= dwd+1; fi
  87.   fill unitsquare shifted -(.5,.5) rotated 45 scaled (.5sqrt2 * dwd)
  88.   shifted z25;
  89.   enddef;
  90.  
  91.   def low_n(expr nw,nh)=
  92.       y38 := good.y nh; x38 := x3;
  93.         y39 := y38 - .6penwd; x39 := nw;
  94.         filldraw fullcircle scaled 1.2penwd shifted(x39,y39);
  95.         z40 = (x39,y38);
  96.         draw z38--z40;
  97.   enddef;
  98.